#ifndef CPHYSICS_H_
#define CPHYSICS_H_

class CPhysics
{
private:
	bool m_bIsJumping;
	bool m_bIsSwimming;
	bool m_bInWater;
	bool m_bIsFlying;
	bool m_bIsFalling;

	float m_fGravity;
	float m_fDrag;


	CPhysics( const CPhysics&  );
	CPhysics& operator=( const CPhysics&  );
public:
	CPhysics( void ) 
	{
		m_bIsJumping = false;
		m_bIsSwimming = false;
		m_bInWater = false;
		m_bIsFlying = false;
		m_bIsFalling = false;

		m_fGravity = 600.001f;
		m_fDrag = 0.9001f;
	}
	~CPhysics( void ) { }
	static CPhysics* GetInstance( void );	
	float IsWalkingLeft( float fVelX, float fElapsedTime );
	float IsWalkingRight( float fVelX, float fElapsedTime );
	float IsSwimming( float fVelY, float fElapsedTime );
	float IsJumping( float fVelY, float fElapsedTime );
	float InWater( float fVelY, float fElapsedTime );
	float IsFlying( float fVelY, float fElapsedTime );
	float IsFalling( float fVelY, float fElapsedTime );
	
	// Accessors
	bool GetIsJumping( void ){ return m_bIsJumping; }
	bool GetIsSwimming( void ) { return m_bIsSwimming; }
	bool GetInWater( void ) { return m_bInWater; }
	bool GetIsFlying( void ) { return m_bIsFlying; }
	bool GetIsFalling( void ) { return m_bIsFalling; }

	// Mutators
	void SetIsJumping( bool bIsJumping ) { m_bIsJumping = bIsJumping ; }
	void SetIsSwimming( bool bIsSwimming ) { m_bIsSwimming = bIsSwimming ; }
	void SetInWater( bool bInWater ) { m_bInWater = bInWater; }
	void SetIsFlying( bool bIsFlying ) { m_bIsFlying = bIsFlying ; }
	void SetIsFalling( bool bIsFalling ) { m_bIsFalling = bIsFalling; }


};
#endif 